/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * UIPrincipal.java
 *
 * Created on 28/06/2011, 21:00:46
 */

package Interfaz;

import Experto.ExpertoTesoro;
import java.awt.Color;
import java.awt.Rectangle;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JTextField;

/**
 *
 * @author edu
 */
public class UIPrincipal extends javax.swing.JFrame {
private int númeroActual = 1;
	private boolean permitirIN = false;
	private javax.swing.JTextField[][] jCasillas;
        ExpertoTesoro tesoro;

    /** Creates new form UIPrincipal */
    public UIPrincipal() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        java.awt.GridBagConstraints gridBagConstraints;

        PanelPrincipal = new javax.swing.JPanel();
        jPanelBloque4 = new javax.swing.JPanel();
        casilla6 = new javax.swing.JLabel();
        casilla5 = new javax.swing.JLabel();
        casilla16 = new javax.swing.JLabel();
        casilla1 = new javax.swing.JLabel();
        casilla3 = new javax.swing.JLabel();
        casilla4 = new javax.swing.JLabel();
        casilla17 = new javax.swing.JLabel();
        casilla11 = new javax.swing.JLabel();
        casilla12 = new javax.swing.JLabel();
        casilla18 = new javax.swing.JLabel();
        casilla2 = new javax.swing.JLabel();
        casilla24 = new javax.swing.JLabel();
        casilla10 = new javax.swing.JLabel();
        casilla30 = new javax.swing.JLabel();
        casilla42 = new javax.swing.JLabel();
        casilla9 = new javax.swing.JLabel();
        casilla36 = new javax.swing.JLabel();
        casilla48 = new javax.swing.JLabel();
        casilla8 = new javax.swing.JLabel();
        casilla7 = new javax.swing.JLabel();
        casilla15 = new javax.swing.JLabel();
        casilla14 = new javax.swing.JLabel();
        casilla13 = new javax.swing.JLabel();
        casilla23 = new javax.swing.JLabel();
        casilla22 = new javax.swing.JLabel();
        casilla21 = new javax.swing.JLabel();
        casilla20 = new javax.swing.JLabel();
        casilla19 = new javax.swing.JLabel();
        casilla29 = new javax.swing.JLabel();
        casilla28 = new javax.swing.JLabel();
        casilla27 = new javax.swing.JLabel();
        casilla26 = new javax.swing.JLabel();
        casilla25 = new javax.swing.JLabel();
        casilla35 = new javax.swing.JLabel();
        casilla34 = new javax.swing.JLabel();
        casilla33 = new javax.swing.JLabel();
        casilla32 = new javax.swing.JLabel();
        casilla31 = new javax.swing.JLabel();
        casilla41 = new javax.swing.JLabel();
        casilla39 = new javax.swing.JLabel();
        casilla38 = new javax.swing.JLabel();
        casilla37 = new javax.swing.JLabel();
        casilla40 = new javax.swing.JLabel();
        casilla47 = new javax.swing.JLabel();
        casilla46 = new javax.swing.JLabel();
        casilla45 = new javax.swing.JLabel();
        casilla44 = new javax.swing.JLabel();
        casilla43 = new javax.swing.JLabel();
        botonAvanzar = new javax.swing.JButton();
        campoMovRest = new javax.swing.JTextField();
        botonPorbabilidad = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();
        campoProb = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        campoPuntos = new javax.swing.JTextField();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        PanelPrincipal.setLayout(new java.awt.GridBagLayout());

        jPanelBloque4.setBackground(new java.awt.Color(183, 216, 87));
        jPanelBloque4.setLayout(new java.awt.GridBagLayout());

        casilla6.setBackground(new java.awt.Color(0, 0, 0));
        casilla6.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla6.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 5;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla6, gridBagConstraints);

        casilla5.setBackground(new java.awt.Color(0, 0, 0));
        casilla5.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla5.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 4;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla5, gridBagConstraints);

        casilla16.setBackground(new java.awt.Color(0, 0, 0));
        casilla16.setAlignmentX(1.0F);
        casilla16.setAlignmentY(1.0F);
        casilla16.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla16.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 7;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla16, gridBagConstraints);

        casilla1.setBackground(new java.awt.Color(0, 0, 0));
        casilla1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla1, gridBagConstraints);

        casilla3.setBackground(new java.awt.Color(0, 0, 0));
        casilla3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla3.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla3, gridBagConstraints);

        casilla4.setBackground(new java.awt.Color(0, 0, 0));
        casilla4.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla4.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla4, gridBagConstraints);

        casilla17.setBackground(new java.awt.Color(0, 0, 0));
        casilla17.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla17.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla17, gridBagConstraints);

        casilla11.setBackground(new java.awt.Color(0, 0, 0));
        casilla11.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla11.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla11, gridBagConstraints);

        casilla12.setBackground(new java.awt.Color(0, 0, 0));
        casilla12.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla12.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla12, gridBagConstraints);

        casilla18.setBackground(new java.awt.Color(0, 0, 0));
        casilla18.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla18.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla18, gridBagConstraints);

        casilla2.setBackground(new java.awt.Color(0, 0, 0));
        casilla2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla2.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla2, gridBagConstraints);

        casilla24.setBackground(new java.awt.Color(0, 0, 0));
        casilla24.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla24.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 7;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla24, gridBagConstraints);

        casilla10.setBackground(new java.awt.Color(0, 0, 0));
        casilla10.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla10.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla10, gridBagConstraints);

        casilla30.setBackground(new java.awt.Color(0, 0, 0));
        casilla30.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla30.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 5;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla30, gridBagConstraints);

        casilla42.setBackground(new java.awt.Color(0, 0, 0));
        casilla42.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla42.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla42, gridBagConstraints);

        casilla9.setBackground(new java.awt.Color(0, 0, 0));
        casilla9.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla9.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla9, gridBagConstraints);

        casilla36.setBackground(new java.awt.Color(0, 0, 0));
        casilla36.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla36.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla36, gridBagConstraints);

        casilla48.setBackground(new java.awt.Color(0, 0, 0));
        casilla48.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla48.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 7;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla48, gridBagConstraints);

        casilla8.setBackground(new java.awt.Color(0, 0, 0));
        casilla8.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla8.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 7;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla8, gridBagConstraints);

        casilla7.setBackground(new java.awt.Color(0, 0, 0));
        casilla7.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla7.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 6;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla7, gridBagConstraints);

        casilla15.setBackground(new java.awt.Color(0, 0, 0));
        casilla15.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla15.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 6;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla15, gridBagConstraints);

        casilla14.setBackground(new java.awt.Color(0, 0, 0));
        casilla14.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla14.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 5;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla14, gridBagConstraints);

        casilla13.setBackground(new java.awt.Color(0, 0, 0));
        casilla13.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla13.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 4;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla13, gridBagConstraints);

        casilla23.setBackground(new java.awt.Color(0, 0, 0));
        casilla23.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla23.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 6;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla23, gridBagConstraints);

        casilla22.setBackground(new java.awt.Color(0, 0, 0));
        casilla22.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla22.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 5;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla22, gridBagConstraints);

        casilla21.setBackground(new java.awt.Color(0, 0, 0));
        casilla21.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla21.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 4;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla21, gridBagConstraints);

        casilla20.setBackground(new java.awt.Color(0, 0, 0));
        casilla20.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla20.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla20, gridBagConstraints);

        casilla19.setBackground(new java.awt.Color(0, 0, 0));
        casilla19.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla19.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 3;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla19, gridBagConstraints);

        casilla29.setBackground(new java.awt.Color(0, 0, 0));
        casilla29.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla29.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 4;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla29, gridBagConstraints);

        casilla28.setBackground(new java.awt.Color(0, 0, 0));
        casilla28.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla28.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla28, gridBagConstraints);

        casilla27.setBackground(new java.awt.Color(0, 0, 0));
        casilla27.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla27.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla27, gridBagConstraints);

        casilla26.setBackground(new java.awt.Color(0, 0, 0));
        casilla26.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla26.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla26, gridBagConstraints);

        casilla25.setBackground(new java.awt.Color(0, 0, 0));
        casilla25.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla25.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla25, gridBagConstraints);

        casilla35.setBackground(new java.awt.Color(0, 0, 0));
        casilla35.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla35.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla35, gridBagConstraints);

        casilla34.setBackground(new java.awt.Color(0, 0, 0));
        casilla34.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla34.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla34, gridBagConstraints);

        casilla33.setBackground(new java.awt.Color(0, 0, 0));
        casilla33.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla33.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla33, gridBagConstraints);

        casilla32.setBackground(new java.awt.Color(0, 0, 0));
        casilla32.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla32.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 7;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla32, gridBagConstraints);

        casilla31.setBackground(new java.awt.Color(0, 0, 0));
        casilla31.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla31.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 6;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla31, gridBagConstraints);

        casilla41.setBackground(new java.awt.Color(0, 0, 0));
        casilla41.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla41.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla41, gridBagConstraints);

        casilla39.setBackground(new java.awt.Color(0, 0, 0));
        casilla39.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla39.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 6;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla39, gridBagConstraints);

        casilla38.setBackground(new java.awt.Color(0, 0, 0));
        casilla38.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla38.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 5;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla38, gridBagConstraints);

        casilla37.setBackground(new java.awt.Color(0, 0, 0));
        casilla37.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla37.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 4;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla37, gridBagConstraints);

        casilla40.setBackground(new java.awt.Color(0, 0, 0));
        casilla40.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla40.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 7;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla40, gridBagConstraints);

        casilla47.setBackground(new java.awt.Color(0, 0, 0));
        casilla47.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla47.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 6;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla47, gridBagConstraints);

        casilla46.setBackground(new java.awt.Color(0, 0, 0));
        casilla46.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla46.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 5;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla46, gridBagConstraints);

        casilla45.setBackground(new java.awt.Color(0, 0, 0));
        casilla45.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla45.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 4;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla45, gridBagConstraints);

        casilla44.setBackground(new java.awt.Color(0, 0, 0));
        casilla44.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla44.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla44, gridBagConstraints);

        casilla43.setBackground(new java.awt.Color(0, 0, 0));
        casilla43.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        casilla43.setOpaque(true);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.ipadx = 50;
        gridBagConstraints.ipady = 50;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanelBloque4.add(casilla43, gridBagConstraints);

        botonAvanzar.setText("Avanzar");
        botonAvanzar.setEnabled(false);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 7;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(50, 0, 0, 0);
        jPanelBloque4.add(botonAvanzar, gridBagConstraints);

        campoMovRest.setEditable(false);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 5;
        gridBagConstraints.gridy = 8;
        gridBagConstraints.ipadx = 40;
        gridBagConstraints.insets = new java.awt.Insets(10, 0, 0, 0);
        jPanelBloque4.add(campoMovRest, gridBagConstraints);

        botonPorbabilidad.setText("Probabilidad");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 7;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.insets = new java.awt.Insets(50, 0, 0, 0);
        jPanelBloque4.add(botonPorbabilidad, gridBagConstraints);

        jLabel1.setText("Movimientos restantes:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 8;
        gridBagConstraints.gridwidth = 3;
        gridBagConstraints.insets = new java.awt.Insets(10, 0, 0, 0);
        jPanelBloque4.add(jLabel1, gridBagConstraints);

        campoProb.setEditable(false);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 4;
        gridBagConstraints.gridy = 7;
        gridBagConstraints.gridwidth = 4;
        gridBagConstraints.ipadx = 150;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(50, 5, 0, 0);
        jPanelBloque4.add(campoProb, gridBagConstraints);

        jLabel2.setText("Puntos acumulados:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 9;
        gridBagConstraints.gridwidth = 3;
        gridBagConstraints.insets = new java.awt.Insets(10, 0, 0, 0);
        jPanelBloque4.add(jLabel2, gridBagConstraints);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 5;
        gridBagConstraints.gridy = 9;
        gridBagConstraints.ipadx = 40;
        gridBagConstraints.insets = new java.awt.Insets(10, 0, 0, 0);
        jPanelBloque4.add(campoPuntos, gridBagConstraints);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanelBloque4, javax.swing.GroupLayout.PREFERRED_SIZE, 729, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(PanelPrincipal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(PanelPrincipal, javax.swing.GroupLayout.PREFERRED_SIZE, 317, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(258, Short.MAX_VALUE))
            .addComponent(jPanelBloque4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 575, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
    * @param args the command line arguments
    
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new UIPrincipal().setVisible(true);
            }
        });
    }*/
/*private void initComponents2() {

    this.setLocationRelativeTo(null);

		java.awt.event.KeyAdapter KA = new java.awt.event.KeyAdapter() {
			public void keyPressed(java.awt.event.KeyEvent evt) {
				//jFrame_keyPressed(evt);
			}
		};
		this.addKeyListener(KA);

		jCasillas = new javax.swing.JTextField[9][9];
    int tamCuad = 34;
    int tamSpace = 40;
    java.awt.event.MouseAdapter casillasMouseListener = new java.awt.event.MouseAdapter() {
      public void mousePressed(java.awt.event.MouseEvent evt) {
        jCasillas_mousePressed(evt);
      }
      public void mouseEntered(java.awt.event.MouseEvent evt) {
        jCasillas_mouseEntered(evt);
      }
      public void mouseExited(java.awt.event.MouseEvent evt) {
        jCasillas_mouseExited(evt);
      }
    };

    for(int h=0;h<9;h++) {
			for(int k=0;k<9;k++) {
				jCasillas[h][k] = new javax.swing.JTextField();
        jCasillas[h][k].setFocusable(false);
				jCasillas[h][k].setEditable(false);
				jCasillas[h][k].setFont(new java.awt.Font("Tahoma", 0, 20));
				jCasillas[h][k].setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jCasillas[h][k].setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 1, 1, Color.LIGHT_GRAY));
        jCasillas[h][k].setForeground(Color.BLACK);
        jCasillas[h][k].setBackground(Color.WHITE);
        jCasillas[h][k].addMouseListener(casillasMouseListener);
         
        
            jPanelBloque4.add(jCasillas[h][k]);
            jPanelBloque4.getComponent(jPanelBloque4.getComponentCount()-1).setBounds(new Rectangle(tamSpace*k, tamSpace*(h-3), tamCuad, tamCuad));
        */
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel PanelPrincipal;
    private javax.swing.JButton botonAvanzar;
    private javax.swing.JButton botonPorbabilidad;
    private javax.swing.JTextField campoMovRest;
    private javax.swing.JTextField campoProb;
    private javax.swing.JTextField campoPuntos;
    private javax.swing.JLabel casilla1;
    private javax.swing.JLabel casilla10;
    private javax.swing.JLabel casilla11;
    private javax.swing.JLabel casilla12;
    private javax.swing.JLabel casilla13;
    private javax.swing.JLabel casilla14;
    private javax.swing.JLabel casilla15;
    private javax.swing.JLabel casilla16;
    private javax.swing.JLabel casilla17;
    private javax.swing.JLabel casilla18;
    private javax.swing.JLabel casilla19;
    private javax.swing.JLabel casilla2;
    private javax.swing.JLabel casilla20;
    private javax.swing.JLabel casilla21;
    private javax.swing.JLabel casilla22;
    private javax.swing.JLabel casilla23;
    private javax.swing.JLabel casilla24;
    private javax.swing.JLabel casilla25;
    private javax.swing.JLabel casilla26;
    private javax.swing.JLabel casilla27;
    private javax.swing.JLabel casilla28;
    private javax.swing.JLabel casilla29;
    private javax.swing.JLabel casilla3;
    private javax.swing.JLabel casilla30;
    private javax.swing.JLabel casilla31;
    private javax.swing.JLabel casilla32;
    private javax.swing.JLabel casilla33;
    private javax.swing.JLabel casilla34;
    private javax.swing.JLabel casilla35;
    private javax.swing.JLabel casilla36;
    private javax.swing.JLabel casilla37;
    private javax.swing.JLabel casilla38;
    private javax.swing.JLabel casilla39;
    private javax.swing.JLabel casilla4;
    private javax.swing.JLabel casilla40;
    private javax.swing.JLabel casilla41;
    private javax.swing.JLabel casilla42;
    private javax.swing.JLabel casilla43;
    private javax.swing.JLabel casilla44;
    private javax.swing.JLabel casilla45;
    private javax.swing.JLabel casilla46;
    private javax.swing.JLabel casilla47;
    private javax.swing.JLabel casilla48;
    private javax.swing.JLabel casilla5;
    private javax.swing.JLabel casilla6;
    private javax.swing.JLabel casilla7;
    private javax.swing.JLabel casilla8;
    private javax.swing.JLabel casilla9;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JPanel jPanelBloque4;
    // End of variables declaration//GEN-END:variables



  /*private void jCasillas_mousePressed(java.awt.event.MouseEvent evt) {
    if(permitirIN) {
			//jTextFieldEstado.setText("");
      javax.swing.JTextField jText = (javax.swing.JTextField)evt.getSource();
			if(jText.isEnabled()) {
				if(númeroActual == 0) {
					jText.setText("");
				}
				else {
					jText.setText("" + númeroActual);
          jText.setForeground(Color.BLUE);
				}
			}
		}
  }
  private void jCasillas_mouseEntered(java.awt.event.MouseEvent evt) {
    if(permitirIN) {
      javax.swing.JTextField jText = (javax.swing.JTextField)evt.getSource();
      if(jText.isEnabled()) {
        //jText.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 1, 1, Color.BLUE));
        jText.setBorder(javax.swing.BorderFactory.createBevelBorder(1));
      }
    }
  }
  private void jCasillas_mouseExited(java.awt.event.MouseEvent evt) {
    if(permitirIN) {
      javax.swing.JTextField jText = (javax.swing.JTextField)evt.getSource();
      if(jText.isEnabled()) {
        jText.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 1, 1, Color.LIGHT_GRAY));
      }
    }
  }

  private void establecerTablero(int[][] matriz) {
    for(int s=0;s<9;s++) {
      for(int r=0;r<9;r++) {
        if(matriz[s][r] == 0) {
          jCasillas[s][r].setText("");
          jCasillas[s][r].setEnabled(true);
          jCasillas[s][r].setBackground(Color.WHITE);
        }
        else {
          jCasillas[s][r].setText(String.valueOf(matriz[s][r]));
          jCasillas[s][r].setEnabled(false);
          jCasillas[s][r].setBackground(Color.LIGHT_GRAY);
        }
      }
    }
    //jToggleButton0.setSelected(true);
    //cambiarNúmeroActual(0);
  }
  private void establecerTableroResuelto(int[][] matriz,boolean[][] iniciales) {
    for(int s=0;s<9;s++) {
      for(int r=0;r<9;r++) {
        if(matriz[s][r] == 0) {
          jCasillas[s][r].setText("");
        }
        else {
          jCasillas[s][r].setText(String.valueOf(matriz[s][r]));
        }
        if(iniciales[s][r]) {
          jCasillas[s][r].setEnabled(false);
          jCasillas[s][r].setBackground(Color.LIGHT_GRAY);
        }
        else {
          jCasillas[s][r].setEnabled(true);
          jCasillas[s][r].setBackground(Color.WHITE);
        }
      }
    }
    //jToggleButton0.setSelected(true);
   // cambiarNúmeroActual(0);
  }
  private int[][] recuperarTableroInicial() {
    int[][] matriz = new int[9][9];
    for(int s=0;s<9;s++) {
      for(int r=0;r<9;r++) {
        if(!jCasillas[s][r].isEnabled()) {
          matriz[s][r] = Integer.parseInt(jCasillas[s][r].getText().trim());
        }
        else {
          matriz[s][r] = 0;
        }
      }
    }
    return matriz;
  }
  private int[][] recuperarTableroCompleto() {
    int[][] matriz = new int[9][9];
    for(int s=0;s<9;s++) {
      for(int r=0;r<9;r++) {
        if(jCasillas[s][r].getText().trim().length() == 0) {
          matriz[s][r] = 0;
        }
        else {
          matriz[s][r] = Integer.parseInt(jCasillas[s][r].getText().trim());
        }
      }
    }
    return matriz;
  }

  
  // </editor-fold>
*/

    public JLabel getCasilla1() {
        return casilla1;
    }

    public void setCasilla1(JLabel casilla1) {
        this.casilla1 = casilla1;
    }

    public JLabel getCasilla10() {
        return casilla10;
    }

    public void setCasilla10(JLabel casilla10) {
        this.casilla10 = casilla10;
    }

    public JLabel getCasilla11() {
        return casilla11;
    }

    public void setCasilla11(JLabel casilla11) {
        this.casilla11 = casilla11;
    }

    public JLabel getCasilla12() {
        return casilla12;
    }

    public void setCasilla12(JLabel casilla12) {
        this.casilla12 = casilla12;
    }

    public JLabel getCasilla13() {
        return casilla13;
    }

    public void setCasilla13(JLabel casilla13) {
        this.casilla13 = casilla13;
    }

    public JLabel getCasilla14() {
        return casilla14;
    }

    public void setCasilla14(JLabel casilla14) {
        this.casilla14 = casilla14;
    }

    public JLabel getCasilla15() {
        return casilla15;
    }

    public void setCasilla15(JLabel casilla15) {
        this.casilla15 = casilla15;
    }

    public JLabel getCasilla16() {
        return casilla16;
    }

    public void setCasilla16(JLabel casilla16) {
        this.casilla16 = casilla16;
    }

    public JLabel getCasilla17() {
        return casilla17;
    }

    public void setCasilla17(JLabel casilla17) {
        this.casilla17 = casilla17;
    }

    public JLabel getCasilla18() {
        return casilla18;
    }

    public void setCasilla18(JLabel casilla18) {
        this.casilla18 = casilla18;
    }

    public JLabel getCasilla19() {
        return casilla19;
    }

    public void setCasilla19(JLabel casilla19) {
        this.casilla19 = casilla19;
    }

    public JLabel getCasilla2() {
        return casilla2;
    }

    public void setCasilla2(JLabel casilla2) {
        this.casilla2 = casilla2;
    }

    public JLabel getCasilla20() {
        return casilla20;
    }

    public void setCasilla20(JLabel casilla20) {
        this.casilla20 = casilla20;
    }

    public JLabel getCasilla21() {
        return casilla21;
    }

    public void setCasilla21(JLabel casilla21) {
        this.casilla21 = casilla21;
    }

    public JLabel getCasilla22() {
        return casilla22;
    }

    public void setCasilla22(JLabel casilla22) {
        this.casilla22 = casilla22;
    }

    public JLabel getCasilla23() {
        return casilla23;
    }

    public void setCasilla23(JLabel casilla23) {
        this.casilla23 = casilla23;
    }

    public JLabel getCasilla24() {
        return casilla24;
    }

    public void setCasilla24(JLabel casilla24) {
        this.casilla24 = casilla24;
    }

    public JLabel getCasilla25() {
        return casilla25;
    }

    public void setCasilla25(JLabel casilla25) {
        this.casilla25 = casilla25;
    }

    public JLabel getCasilla26() {
        return casilla26;
    }

    public void setCasilla26(JLabel casilla26) {
        this.casilla26 = casilla26;
    }

    public JLabel getCasilla27() {
        return casilla27;
    }

    public void setCasilla27(JLabel casilla27) {
        this.casilla27 = casilla27;
    }

    public JLabel getCasilla28() {
        return casilla28;
    }

    public void setCasilla28(JLabel casilla28) {
        this.casilla28 = casilla28;
    }

    public JLabel getCasilla29() {
        return casilla29;
    }

    public void setCasilla29(JLabel casilla29) {
        this.casilla29 = casilla29;
    }

    public JLabel getCasilla3() {
        return casilla3;
    }

    public void setCasilla3(JLabel casilla3) {
        this.casilla3 = casilla3;
    }

    public JLabel getCasilla30() {
        return casilla30;
    }

    public void setCasilla30(JLabel casilla30) {
        this.casilla30 = casilla30;
    }

    public JLabel getCasilla31() {
        return casilla31;
    }

    public void setCasilla31(JLabel casilla31) {
        this.casilla31 = casilla31;
    }

    public JLabel getCasilla32() {
        return casilla32;
    }

    public void setCasilla32(JLabel casilla32) {
        this.casilla32 = casilla32;
    }

    public JLabel getCasilla33() {
        return casilla33;
    }

    public void setCasilla33(JLabel casilla33) {
        this.casilla33 = casilla33;
    }

    public JLabel getCasilla34() {
        return casilla34;
    }

    public void setCasilla34(JLabel casilla34) {
        this.casilla34 = casilla34;
    }

    public JLabel getCasilla35() {
        return casilla35;
    }

    public void setCasilla35(JLabel casilla35) {
        this.casilla35 = casilla35;
    }

    public JLabel getCasilla36() {
        return casilla36;
    }

    public void setCasilla36(JLabel casilla36) {
        this.casilla36 = casilla36;
    }

    public JLabel getCasilla37() {
        return casilla37;
    }

    public void setCasilla37(JLabel casilla37) {
        this.casilla37 = casilla37;
    }

    public JLabel getCasilla38() {
        return casilla38;
    }

    public void setCasilla38(JLabel casilla38) {
        this.casilla38 = casilla38;
    }

    public JLabel getCasilla39() {
        return casilla39;
    }

    public void setCasilla39(JLabel casilla39) {
        this.casilla39 = casilla39;
    }

    public JLabel getCasilla4() {
        return casilla4;
    }

    public void setCasilla4(JLabel casilla4) {
        this.casilla4 = casilla4;
    }

    public JLabel getCasilla40() {
        return casilla40;
    }

    public void setCasilla40(JLabel casilla40) {
        this.casilla40 = casilla40;
    }

    public JLabel getCasilla41() {
        return casilla41;
    }

    public void setCasilla41(JLabel casilla41) {
        this.casilla41 = casilla41;
    }

    public JLabel getCasilla42() {
        return casilla42;
    }

    public void setCasilla42(JLabel casilla42) {
        this.casilla42 = casilla42;
    }

    public JLabel getCasilla43() {
        return casilla43;
    }

    public void setCasilla43(JLabel casilla43) {
        this.casilla43 = casilla43;
    }

    public JLabel getCasilla44() {
        return casilla44;
    }

    public void setCasilla44(JLabel casilla44) {
        this.casilla44 = casilla44;
    }

    public JLabel getCasilla45() {
        return casilla45;
    }

    public void setCasilla45(JLabel casilla45) {
        this.casilla45 = casilla45;
    }

    public JLabel getCasilla46() {
        return casilla46;
    }

    public void setCasilla46(JLabel casilla46) {
        this.casilla46 = casilla46;
    }

    public JLabel getCasilla47() {
        return casilla47;
    }

    public void setCasilla47(JLabel casilla47) {
        this.casilla47 = casilla47;
    }

    public JLabel getCasilla48() {
        return casilla48;
    }

    public void setCasilla48(JLabel casilla48) {
        this.casilla48 = casilla48;
    }

    public JLabel getCasilla5() {
        return casilla5;
    }

    public void setCasilla5(JLabel casilla5) {
        this.casilla5 = casilla5;
    }

    public JLabel getCasilla6() {
        return casilla6;
    }

    public void setCasilla6(JLabel casilla6) {
        this.casilla6 = casilla6;
    }

    public JLabel getCasilla7() {
        return casilla7;
    }

    public void setCasilla7(JLabel casilla7) {
        this.casilla7 = casilla7;
    }

    public JLabel getCasilla8() {
        return casilla8;
    }

    public void setCasilla8(JLabel casilla8) {
        this.casilla8 = casilla8;
    }

    public JLabel getCasilla9() {
        return casilla9;
    }

    public void setCasilla9(JLabel casilla9) {
        this.casilla9 = casilla9;
    }

    public JButton getBotonAvanzar() {
        return botonAvanzar;
    }

    public void setBotonAvanzar(JButton botonAvanzar) {
        this.botonAvanzar = botonAvanzar;
    }

    public JButton getBotonPorbabilidad() {
        return botonPorbabilidad;
    }

    public void setBotonPorbabilidad(JButton botonPorbabilidad) {
        this.botonPorbabilidad = botonPorbabilidad;
    }

    public JTextField getCampoMovRest() {
        return campoMovRest;
    }

    public void setCampoMovRest(JTextField casillaMovRest) {
        this.campoMovRest = casillaMovRest;
    }

    public JTextField getCampoProb() {
        return campoProb;
    }

    public void setCampoProb(JTextField casillaProb) {
        this.campoProb = casillaProb;
    }

    public JTextField getCampoPuntos() {
        return campoPuntos;
    }

    public void setCampoPuntos(JTextField campoPuntos) {
        this.campoPuntos = campoPuntos;
    }


    
    
    
    
    
}
